Algebraic Effects and Handlers
Computational Effectを代数的に扱う
KokaでAlgebraic Effectsに触れるに色々書いた
論文
『Algebraic Operations and Generic Effects』
Algebraic Effectsの初出
『Handling Algebraic Effects』
Algebraic Handlersの初出
主に2つの機構からなる
Effect (Effect Type)
副作用のことを全てひっくるめてEffectと呼んでいる
具体例を見るのが早い
ref KokaのEffect Types
Effect Handler
Algebraic Effetcsを備えている言語の例
Koka
Eff
Multicore OCaml
Desk
Frank
Unison
Effekt
参考
GitHub - yallop/effects-bibliography: A collaborative bibliography of work related to the theory and practice of computational effects
実装や色々な資料がまとまっている
monadからeffectへ - Just $ A sandbox
Notions of Computations and Effects - Just $ A sandbox
Algebraic Effects 自習用資料まとめ. Web記事、論文、発表資料、コード、言語など | by Yuki Kodama | Medium
#WIP
interfaceと実装の分離
関数の色が付かない
かと言って引数で連鎖するなんてこともしなくていい
effectも推論してくれる
モナドと似ているところ
言語そのものに構文を持たす必要がない
モナドとの違い
色が付かない
monad stackのような制限がない
表現できるeffectがよりきめ細かい
effectを代数的に組み合わせることができる
effect handlerも代数的に使える
resumeできる
injectionできる
『An Introduction to Algebraic Effects and Handlers』
『What is algebraic about algebraic effects and handlers?』
Misreading Chat 63
『Programming with algebraic effects and handlers』
https://nymphium.github.io/2020/02/20/shallow_effec_handler_with_fcontrol.html
Shallow Effect Handler
https://susisu.hatenablog.com/entry/2020/05/06/191200
ts
chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/https://nymphium.github.io/src/2022/09/17/ae-impl/ae-impl.pdf
chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/https://nymphium.github.io/pdf/effect_study.pdf